Skip to content

gh-152228: Fix a crash in str.replace under a limited memory case#152229

Open
sobolevn wants to merge 2 commits into
python:mainfrom
sobolevn:issue-152228
Open

gh-152228: Fix a crash in str.replace under a limited memory case#152229
sobolevn wants to merge 2 commits into
python:mainfrom
sobolevn:issue-152228

Conversation

@sobolevn

@sobolevn sobolevn commented Jun 25, 2026

Copy link
Copy Markdown
Member

Because test was simple enough and was always 0 as the memory limit, I decided to include it.

@sobolevn sobolevn added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 25, 2026
Comment thread Lib/test/test_str.py
Co-authored-by: Stan Ulbrych <stan@python.org>
@sobolevn

Copy link
Copy Markdown
Member Author

Created #152236 to track Py_TRACE_REFS skips. There are several tests that don't have that.

@@ -0,0 +1 @@
Fix a crash in :meth:`str.replace` under a limited memory situation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't call it a "crash". It's "only" an assertion failure when Python is built in debug mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants